GM.Name 	= "ScrapWars"
GM.Author 	= "SEBI, Luksor"
GM.Email 	= "sebi.noreply@gmail.com"
GM.Website 	= "not yet available"
GM.Help		= "In teams, build vechicle from materials around you, on junkyard."


if SERVER then
	AddCSLuaFile("shared.lua")
	AddCSLuaFile("cl_init.lua")
end
DeriveGamemode( "fretta" )
 
GM.Data = {}


IncludePlayerClasses()					// Automatically includes files in "gamemode/player_class"
 
GM.TeamBased = true					// Team based game or a Free For All game?
GM.AllowAutoTeam = true
GM.AllowSpectating = true
GM.SecondsBetweenTeamSwitches = 60
GM.GameLength = 30
GM.RoundLimit = 10					// Maximum amount of rounds to be played in round based games
GM.VotingDelay = 5					// Delay between end of game, and vote. if you want to display any extra screens before the vote pops up
 
GM.NoPlayerSuicide = false
GM.NoPlayerDamage = false
GM.NoPlayerSelfDamage = true		// Allow players to hurt themselves?
GM.NoPlayerTeamDamage = true		// Allow team-members to hurt each other?
GM.NoPlayerPlayerDamage = true 		// Allow players to hurt each other?
GM.NoNonPlayerPlayerDamage = false 	// Allow damage from non players (physics, fire etc)
GM.NoPlayerFootsteps = false		// When true, all players have silent footsteps
GM.PlayerCanNoClip = false			// When true, players can use noclip without sv_cheats
GM.TakeFragOnSuicide = false		// -1 frag on suicide
 
GM.MaximumDeathLength = 10			// Player will respawn if death length > this (can be 0 to disable)
GM.MinimumDeathLength = 3			// Player has to be dead for at least this long
GM.AutomaticTeamBalance = false     // Teams will be periodically balanced 
GM.ForceJoinBalancedTeams = true	// Players won't be allowed to join a team if it has more players than another team
GM.RealisticFallDamage = true
GM.AddFragsToTeamScore = false		// Adds player's individual kills to team score (must be team based)
 
GM.NoAutomaticSpawning = false		// Players don't spawn automatically when they die, some other system spawns them
GM.RoundBased = true				// Round based, like CS
GM.RoundLength = 60 * 2					// Round length, in seconds
GM.RoundPreStartTime = 5			// Preperation time before a round starts
GM.RoundPostLength = 5				// Seconds to show the 'x team won!' screen at the end of a round
GM.RoundEndsWhenOneTeamAlive = false	// CS Style rules
 
GM.EnableFreezeCam = false			// TF2 Style Freezecam
GM.DeathLingerTime = 3				// The time between you dying and it going into spectator mode, 0 disables
 
GM.SelectModel = true               // Can players use the playermodel picker in the F1 menu?
GM.SelectColor = false				// Can players modify the colour of their name? (ie.. no teams)
 
GM.PlayerRingSize = 48              // How big are the colored rings under the player's feet (if they are enabled) ?
GM.HudSkin = "SimpleSkin"
 
GM.ValidSpectatorModes = { OBS_MODE_CHASE, OBS_MODE_IN_EYE, OBS_MODE_ROAMING }
GM.ValidSpectatorEntities = { "player", "sw_quad" }	// Entities we can spectate
GM.CanOnlySpectateOwnTeam = true // you can only spectate players on your own team

TEAM_RED = 10
TEAM_REDa = 11
TEAM_REDe = 12
TEAM_BLU = 20
TEAM_BLUa = 21
TEAM_BLUe = 22

 
function GM:CreateTeams()
	if ( !GAMEMODE.TeamBased ) then return end

	
	team.SetUp( TEAM_BLU, "Blu", Color( 64, 64, 225 ), true )
	team.SetSpawnPoint( TEAM_BLU, { "sw_spawn_blu" } )
	team.SetClass( TEAM_BLU, { "Blu" } )
	
	team.SetUp( TEAM_BLUa, "Blu Assembler", Color( 225, 64, 64 ), true )
	team.SetSpawnPoint( TEAM_BLUa, { "sw_spawn_blu" } )
	team.SetClass( TEAM_BLUa, { "Blu Assembler" } )
	
	team.SetUp( TEAM_BLUe, "Blu Engie", Color( 225, 64, 64 ), true )
	team.SetSpawnPoint( TEAM_BLUe, { "sw_spawn_blu" } )
	team.SetClass( TEAM_BLUe, { "Blu Engie" } )
	
	team.SetUp( TEAM_RED, "Red", Color( 64, 64, 225 ), true )
	team.SetSpawnPoint( TEAM_RED, { "sw_spawn_red" } )
	team.SetClass( TEAM_RED, { "Red" } )
	
	team.SetUp( TEAM_REDe, "Red Engie", Color( 64, 64, 225 ), true )
	team.SetSpawnPoint( TEAM_REDe, { "sw_spawn_red" } )
	team.SetClass( TEAM_REDe, { "Red Engie" } )
	
	team.SetUp( TEAM_REDa, "Red Assembler", Color( 64, 64, 225 ), true )
	team.SetSpawnPoint( TEAM_REDa, { "sw_spawn_red" } )
	team.SetClass( TEAM_REDa, { "Red Assembler" } )
	
	

end

include("playerclass.lua")

 
 
 
 
 
 
 
 